package com.bana.fvs.protocol;

import com.bana.fvs.model.FogArea;
import com.bana.fvs.model.Visibility;

import java.io.ByteArrayInputStream;
import java.io.DataInputStream;
import java.io.IOException;

/**
 * 查询控制器当前能见度
 */
public class QueryControllerVisibility {

    public int getId()
    {
        return 0x27;
    }

    public byte[] toBuffer(int kzqbsm)
    {
        byte[] buffer=new byte[4];
        buffer[0]=(byte)0x81;
        buffer[1]=(byte)kzqbsm;
        buffer[2]=(byte)getId();
        buffer[3]=(byte)0xff;
        return buffer;
    }

    public FogArea toModel(byte[] buffer) throws IOException {
       NoticeVisibilityStatus noticeVisibilityStatus=new NoticeVisibilityStatus();
       return noticeVisibilityStatus.toModel(buffer);
    }
}
